<?php
/*if($kimenet == 'whatsnext'){
	//nem html adunk vissza hanem JSON-t, mert így könyebb lesz a javascriptben az elem frissítése, beillesztése

	$cssclass = 'c'.$aTask['Category']['id'];
	if($aTask['Task']['types_id'] == $settings['task_type_finished']) $cssclass .= ' ' . CSS_TASK_FINISHED;
	if($aTask['Task']['due'] < date('Y-m-d')) $cssclass .= ' ' . CSS_TASK_OVERDUED;

	$href = './tasks/edit/'.$aTask['Task']['id'];
	//todo: ezt itt cserélni kéne valahogy
	$style = 'background-color:#'.$aTask['Category']['color'];
	$title = $aTask['Task']['path'];
	$szoveg = $aTask['Task']['task'];

	if((!$settings['show_maybe'] && $aTask['Task']['types_id'] == $settings['task_type_maybe']) || 
	(!$settings['show_waiting'] && $aTask['Task']['types_id'] == $settings['task_type_waiting']))
		$json = '{'.
			'"id" : "'.$aTask['Task']['id'].'",'.
			'"href" : "'.$href.'",'.
			'"style" : "display:none",'.
			'"cssclass" : "'.$cssclass.'",'.
			'"title" : "'.$title.'",'.
			'"text" : "'.$szoveg.'"'.
			'}';
	else
		$json = '{'.
			'"id" : "'.$aTask['Task']['id'].'",'.
			'"href" : "'.$href.'",'.
			'"style" : "'.$style.'",'.
			'"cssclass" : "'.$cssclass.'",'.
			'"title" : "'.$title.'",'.
			'"text" : "'.$szoveg.'"'.
			'}';
		
		
	header('Content-Encoding: utf-8'); 
	header("Pragma: no-cache");  
	header("Cache-Control: no-store, no-cache, max-age=0, must-revalidate");  
	header('Content-Type: application/json; charset=utf-8');
	print $json;
	}
*/	
/*if($kimenet == 'tasklist'){
	//todo: itt is jsont kéne visszadnia
	$attributes = ($aTask['Task']['types_id'] == $settings['task_type_finished']) ? array('title'=>EDIT, 'class'=>CSS_TASK_FINISHED, 'id'=>'t'.$aTask['Task']['id']) : array('title'=>EDIT, 'id'=>'t'.$aTask['Task']['id']);
	print $html->image('empty.jpg');
	if(SHOWBIDJID) print '('.$aTask['Task']['bid'].'/'.$aTask['Task']['jid'].') ';
	$db = '';	//todo: leszármazottak
	print $html->link($aTask['Task']['task'] . $db, '/tasks/edit/'.$aTask['Task']['id'], $attributes);
	print '<span>';
	print $html->link($html->image('done.jpg',array('title'=>DONE)),'/tasks/setClosed/'.$aTask['Task']['id'],null,null,false) .
		' ' . $html->link($html->image('new.jpg',array('title'=>NEWSUB)),'/tasks/add/'.$aTask['Task']['id'],null,null,false) .
		' ' . $html->link($html->image('delete.jpg',array('title'=>DELETE)),'/tasks/delete/'.$aTask['Task']['id'],null,null,false);
	print '</span>';
	}
*/
//if($kimenet == 'raw'){
	header('Content-Encoding: utf-8'); 
	header("Pragma: no-cache");  
	header("Cache-Control: no-store, no-cache, max-age=0, must-revalidate");  
	header('Content-Type: application/json; charset=utf-8');
	print json_encode($aTask['Task']);
	//}
?>